/*
 * FactorySimpeXML.h
 *
 *  Created on: 15.12.2012
 *      Author: caffeine
 */

#ifndef FACTORYSIMPEXML_H_
#define FACTORYSIMPEXML_H_

#include <lampe/xml/TFactorySimpeXML.h>
#include <lampe/xml/IFactoryRecord.h>
#include <boost/function.hpp>

namespace lampe{
namespace xml{


class FactorySimpeXML: public lampe::xml::IFactoryRecord{
private:
	XMLTagFactoryFunction tag;
	XMLAttribyteFactoryFunction att;
	lampe::String elementName;
public:
	FactorySimpeXML(lampe::String element,XMLTagFactoryFunction function);
	FactorySimpeXML(lampe::String element,XMLAttribyteFactoryFunction function);
	~FactorySimpeXML();
	virtual lampe::xml::TagResult tagHandlerBefor(lampe::xml::IXMLFactoryEnvironment*environment,lampe::xml::IXmlNode*node);
	virtual lampe::xml::TagResult tagHandlerAfter(lampe::xml::IXMLFactoryEnvironment*environment,lampe::xml::IXmlNode*node);
	virtual lampe::xml::TagResult attributeHandler(lampe::xml::IXMLFactoryEnvironment*environment,lampe::xml::IXmlNode*node,lampe::u32 index);
	virtual LAMPE_VECTOR_VENDOR<lampe::String> getProcessedTags();
	virtual LAMPE_VECTOR_VENDOR<lampe::String> getProcessedAttributes();
};

//void regSimpeTag(lampe::xml::IXMLFactoryEnvironment*environment,lampe::String element,XMLTagFactoryFunction function);
//void regSimpeAttribute(lampe::xml::IXMLFactoryEnvironment*environment,lampe::String element,XMLAttribyteFactoryFunction function);

}//namespace xml
}//namespace lampe

#endif /* FACTORYSIMPEXML_H_ */
